Skip to content

Validate list audit event matches URL-requested list, and unit test.#7757

Open
labkey-bpatel wants to merge 1 commit into
release25.7-SNAPSHOTfrom
25.7_fb_owasp_lists_audit
Open

Validate list audit event matches URL-requested list, and unit test.#7757
labkey-bpatel wants to merge 1 commit into
release25.7-SNAPSHOTfrom
25.7_fb_owasp_lists_audit

Conversation

@labkey-bpatel

@labkey-bpatel labkey-bpatel commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Rationale

OWASP Finding: _list container-resolved, but rendered old/new maps from AuditLogService.getAuditEvent(user, LIST_AUDIT_EVENT, rowId) global (cf=null); event never tied to list, event.getContainer() unchecked

The audit details action previously looked up audit events globally by row ID after resolving the requested list, which could allow an event from one list to be displayed in the context of another list. The fix tightens the lookup to the resolved list container and ensures the event is associated with the requested list before returning any record data

Related Pull Requests

Changes

  • Pass an explicit ContainerFilter.current(_list.getContainer(), user) to getAuditEvent so the lookup is anchored to the list's container even if the audit schema's default ContainerFilter is ever changed.
  • Add ListAuditProvider.auditEventMatchesList() — verifies the event's listId and container match the URL-requested values. Treat any mismatch as "no details available" (same UX as the legitimate event-not-found path).
  • Add ListAuditProvider.TestCase covering the predicate matrix: match, null event, wrong listId, wrong container, null event container. Registered in ListModule.getUnitTests.

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation
  • Verify Fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant